#include<iostream>
#include<string>
#include<vector>

using namespace std;
int main(){
    string words;
    int count[256] = {0};
    int flag = 0;
    getline(cin,words);
    for(int i = 0; i < words.size(); i++)
        count[words[i]] += 1;
    for(int i = 0; i < words.size(); i++)
        if(count[words[i]] == 1){
            cout << words[i] << endl;
            flag = 1;
            break;
        }
    if(!flag)
        cout << -1 << endl;
    return 0;
}
    